package file;

public class ArrayDemo2 {
    public static  void main(String[] args) {
        //初始化借阅次数数组（单位：次）
        int[] borrowCounts = {8,15,5,20,12};
        String [] bookTitles = {"Java编程基础","数据结构与算法","Python入门","数据库原理","计算机网络"};
        //修改“Java编程基础”的借阅次数为10
        borrowCounts[0] = 10;
        //统计借阅次数>=10的图书
        int count = 0;
        System.out.println("借阅次数>=10的图书：");
        for (int i = 0; i < borrowCounts.length; i++) {
            if (borrowCounts[i] >= 10) {
                System.out.println(bookTitles[i] + ": " + borrowCounts[i] + "次");
                count++;
            }
        }
        System.out.println("共" + count + "本图书满足条件");


    }
}
